.class public final Lcn/cheln/explorer/util/a;
.super Ljava/lang/Object;


# static fields
.field private static b:Lcn/cheln/explorer/util/a;


# instance fields
.field public a:Ljava/util/Map;


# direct methods
.method protected constructor <init>()V
    .locals 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcn/cheln/explorer/util/a;->a:Ljava/util/Map;

    return-void
.end method

.method public static a(Lcn/cheln/explorer/util/DialogUtil$DialogAbstract;)Landroid/app/AlertDialog;
    .locals 3

    iget-object v0, p0, Lcn/cheln/explorer/util/DialogUtil$DialogAbstract;->g:Landroid/content/Context;

    if-nez v0, :cond_0

    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "contxet is null"

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    new-instance v0, Landroid/app/AlertDialog$Builder;

    iget-object v1, p0, Lcn/cheln/explorer/util/DialogUtil$DialogAbstract;->g:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setCancelable(Z)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    iget-object v1, p0, Lcn/cheln/explorer/util/DialogUtil$DialogAbstract;->c:Ljava/lang/String;

    iget-object v2, p0, Lcn/cheln/explorer/util/DialogUtil$DialogAbstract;->d:Landroid/content/DialogInterface$OnClickListener;

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    iget-object v1, p0, Lcn/cheln/explorer/util/DialogUtil$DialogAbstract;->e:Ljava/lang/String;

    iget-object v2, p0, Lcn/cheln/explorer/util/DialogUtil$DialogAbstract;->f:Landroid/content/DialogInterface$OnClickListener;

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setNegativeButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    iget-object v1, p0, Lcn/cheln/explorer/util/DialogUtil$DialogAbstract;->a:Ljava/lang/String;

    if-eqz v1, :cond_1

    iget-object v1, p0, Lcn/cheln/explorer/util/DialogUtil$DialogAbstract;->a:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    :cond_1
    iget-object v1, p0, Lcn/cheln/explorer/util/DialogUtil$DialogAbstract;->b:Ljava/lang/String;

    if-eqz v1, :cond_2

    iget-object v1, p0, Lcn/cheln/explorer/util/DialogUtil$DialogAbstract;->b:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    :cond_2
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    move-result-object v0

    return-object v0
.end method

.method public static a()Lcn/cheln/explorer/util/a;
    .locals 1

    sget-object v0, Lcn/cheln/explorer/util/a;->b:Lcn/cheln/explorer/util/a;

    if-nez v0, :cond_0

    new-instance v0, Lcn/cheln/explorer/util/a;

    invoke-direct {v0}, Lcn/cheln/explorer/util/a;-><init>()V

    sput-object v0, Lcn/cheln/explorer/util/a;->b:Lcn/cheln/explorer/util/a;

    :cond_0
    sget-object v0, Lcn/cheln/explorer/util/a;->b:Lcn/cheln/explorer/util/a;

    return-object v0
.end method


# virtual methods
.method public final a(Lcom/direction/hold/ui/CommonActivity;)V
    .locals 3

    iget-object v0, p0, Lcn/cheln/explorer/util/a;->a:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :cond_0
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_2

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Class;

    if-eqz p1, :cond_1

    invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v2

    if-eq v0, v2, :cond_0

    :cond_1
    iget-object v2, p0, Lcn/cheln/explorer/util/a;->a:Ljava/util/Map;

    invoke-interface {v2, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/direction/hold/ui/CommonActivity;

    invoke-virtual {v0}, Lcom/direction/hold/ui/CommonActivity;->v()V

    goto :goto_0

    :cond_2
    return-void
.end method

.method public final b()V
    .locals 4

    sget-object v0, Lcom/direction/hold/ui/SlideActivity;->b:Lcom/direction/hold/FileApp;

    const-string v1, "ApkRememberedPage"

    const-string v2, "apk"

    const-string v3, ""

    invoke-static {v0, v1, v2, v3}, Lcn/cheln/support/app/e;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V

    sget-object v0, Lcom/direction/hold/ui/SlideActivity;->b:Lcom/direction/hold/FileApp;

    new-instance v1, Landroid/content/Intent;

    sget-object v2, Lcom/direction/hold/ui/SlideActivity;->b:Lcom/direction/hold/FileApp;

    const-class v3, Lcn/cheln/explorer/ds/scan/ScanService;

    invoke-direct {v1, v2, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    invoke-virtual {v0, v1}, Lcom/direction/hold/FileApp;->stopService(Landroid/content/Intent;)Z

    new-instance v0, Ljava/util/HashSet;

    iget-object v1, p0, Lcn/cheln/explorer/util/a;->a:Ljava/util/Map;

    invoke-interface {v1}, Ljava/util/Map;->values()Ljava/util/Collection;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V

    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_0

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lcom/direction/hold/ui/CommonActivity;

    invoke-virtual {p0}, Lcom/direction/hold/ui/CommonActivity;->finish()V

    goto :goto_0

    :cond_0
    invoke-interface {v0}, Ljava/util/Set;->clear()V

    const/4 v0, 0x0

    invoke-static {v0}, Ljava/lang/System;->exit(I)V

    return-void
.end method
